﻿using UnityEngine;
using System.Collections;

public class ShortSword : Weapon 
{
	private int m_DamageShortSword = 10;
	private GameObject m_ShortSword;
	private GameObject m_Target;

	void Start () 
	{
	
	}

	void Update () 
	{
		
	}
	
	public override void Attack()
	{
		base.Attack();
		transform.parent.GetComponent<Animator>().SetBool("isAttackingShortSword", true);
		Debug.Log("slash");
		Invoke("StopAttack",1f);
		Debug.Log ("ca marche!!!");
	}
	private void StopAttack()
	{
		transform.parent.GetComponent<Animator>().SetBool("isAttackingShortSword", false);
	}
	
	
	protected override void OnTriggerEnter2D(Collider2D _other)
	{
		base.OnTriggerEnter2D(_other);
		Debug.Log ("Outch");
	}
}
